<template>
  <div class="son">
    爸爸 book数量: {{ book }} <br />
    {{ xie }}
    <!-- {{ tao }} -->
    <xiao-ming ref="xiaoming" :a="xie" v-bind="$attrs"></xiao-ming>
  </div>
</template>
  
  <script setup lang="ts">
import { ref } from 'vue'
import XiaoMing from './XiaoMing.vue'
defineProps(['xie'])

let book = ref(3)

//暴露book这个变量给父级改
defineExpose({ book })
</script>

  <style scoped>
.son {
  background-color: paleturquoise;
  width: 90%;
  height: 230px;
  border: 1px solid black;
  border-radius: 10px;
}
</style>